home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CD32 / CD32_Support / SCSI_CD / installifnewer < prev    next >
Encoding:
AmigaDOS Script File  |  1993-10-18  |  590 b   |  21 lines

  1. .key file1/a,file2/a,destdir/a
  2. .bra {
  3. .ket }
  4.  
  5. ;---- install file1 if newer than file2
  6. ;---- uses vertextcomp (version text compare) command
  7.  
  8. version >t:ver1{$$} {file1} FILE
  9. version >t:ver2{$$} {file2} FILE
  10. vertextcomp t:ver1{$$} t:ver2{$$}
  11. if warn
  12.     requestchoice >t:OKCancel TITLE "" BODY "Installing {file1}. OK?" GADGETS OK CANCEL
  13.     if not warn
  14.             copy {file1} {destdir}
  15.     else
  16.     requestchoice >t:OKCancel TITLE "" BODY "Aborting partial installation." GADGETS OK
  17.     endif
  18. else
  19.     requestchoice >t:OKCancel TITLE "" BODY "Not Installing {file1} (newer or same present)." GADGETS OK
  20. endif
  21.